File System to Veeva Vault | Implementation Template icon

File System to Veeva Vault | Implementation Template

(0 reviews)

Setup Instructions

To get this template to run, there are several preconditions to consider. Failing to do so can lead to connectivity errors. These preconditions are:

  • Veeva Vault Credentials – Require Vault URL, Username, Password, Vault API Version, Client Id.
  • Veeva Vault FTP Credentials – Require Host, Port, Username, Password.
  • JKS Certificate for FTPS connector – Require .jks file for FTPS connector to establish TLS connection with Vault FTP server. Following are the steps to follow to create .jks file, you can use Java Keytool located under /bin directory. Below is an example:
    • Run command from /bin directory.keytool -genkey -keyalg RSA -alias selfsigned -keystore vault-ftp-server.jks -storepass password -validity 360 -keysize 2048
    • This will create vault-ftp-server.jks file at current directory.
    • Copy/Import vault-ftp-server.jks file under project directory (src/main/resources).
  • While Deploying on Cloudhub it is recommended to select more than 1 vCore based on documents metadata volume, number of records and its size of each record. For Migration integrations this is especially important otherwise memory error may occur.
  • Veeva System has upgraded Vault FTP Staging server to be more scalable, due to changes on Network load balancing FTP client (Java FTP Client) need to send flag (ftpsClient.setRemoteVerificationEnabled to false). MuleSoft FTPS Connector (v1.4.1) by default set (implicitly) the above flag as true and there is no option available in connector configuration to set the above flag. An enhancement request is logged with MuleSoft engineering. With the above changes/upgrades the FTPS connector fails to connect with Vault FTP server currently and to overcome this issue instead of using the hostname as the Vault DNS, use the POD/FTP specific DNS, you have to check with Veeva Support to provide POD/FTP DNS.
  • The FTPS Connector (v1.4.1) is not reusing connection from pool after operation, this ends up in exhausting max connection (50) on Vault FTP Staging server and hit into an error max connection exceeded. A defect is logged with MuleSoft engineering to address this issue. As a workaround you can configure Pooling profile in FTPS Connector configuration in advanced tab. For e.g:
    • Max Active: 5
    • Max Idle: 5
    • Initialisation Policy: INITIALISE_ONE
    • Exhausted Action: WHEN_EXHAUSTED_GROW
    • Max wait: 5
    • Min Eviction: 5000
    • Eviction Check Interval: 5000

Run Stand Alone

In this section we detail the way you should run your template on your computer.

Where to Download Anypoint Studio and the Mule Runtime

If you are new to Mule, download this software:

Import Template in Studio

In Studio, click the Exchange X icon in the upper left of the taskbar, log in with your Anypoint Platform credentials, search for the template, and click Open.

Run in Studio

After opening your template in Anypoint Studio, follow these steps to run it:

Create Documents using CSV file.

  1. Locate the properties file configuration.yaml in src/main/resources/config.
  2. Complete Veeva Vault and Vault FTP server credentials in Properties to Configure section.
  3. Make sure you have CVS metadata for Create Documents in respective file (create-documents-data.csv) located (src/main/resources/data/input/)
  4. Right click the template project folder.
  5. Hover your mouse over Run as.
  6. Click Mule Application.
  7. Click Run.
  8. Once deployment successful, trigger through browser using URL – https://localhost:8082/create-documents?UploadFile=true to Create Documents.
  9. You can check created documents status response in file (create-documents-response.json) in JSON format and on browser.
  10. Note: Document metadata is read/retrieved from location “${mule.home}/apps/${app.name}/data/input/create-documents-data.csv” contains documents metadata which is bundled with attached template as an example.
  11. Note: Documents created status response is stored in file “create-documents-response.json” at location “${mule.home}/apps/${app.name}/data/output/”.

Note: Document files is read/uploaded from location “${mule.home}/apps/${app.name}/data/input/TestDocument.docx”which is bundled with attached template as an example.

Create Document Renditions using CSV file

  1. Locate the properties file configuration.yaml in src/main/resources/config.
  2. Complete Veeva Vault and Vault FTP server credentials in "Properties to Configure" section.
  3. Make sure you have CVS metadata for Create Document Renditions in respective file (create-document-renditions-data.csv) located (src/main/resources/data/input/).
  4. Make sure you have updated document Ids (“id” - attribute values with ids created in Create Documents output) in file (create-document-renditions-data.csv located - src/main/resources/data/input/), so that renditions file are linked with documents on Vault.
  5. Right click the template project folder.
  6. Hover your mouse over Run as.
  7. Click Mule Application.
  8. Click Run.
  9. Once deployment successful, trigger through browser using URL – https://localhost:8082/create-document-renditions?UploadFile=true to Create Document Renditions.
  10. You can check created document renditions status response in file (create-document-renditions-response.json) in JSON format and on browser.
  11. Note: Document metadata is read/retrieved from location “${mule.home}/apps/${app.name}/data/input/create-document-rendtions-data.csv” contains documents metadata which is bundled with attached template as an example.
  12. Note: Document Renditions created status response is stored in file “create-document-renditions-response.json” at location “${mule.home}/apps/${app.name}/data/output/”.
  13. Note: Document Renditions files is read/uploaded from location “${mule.home}/apps/${app.name}/data/input/TestDocument.docx” which is bundled with attached template as an example.

Create Object Records using CSV file

  1. Similarly, for the flow - create-object-records-synchronously-using-csv-metadata.
  2. To create object records trigger the flow through browser using URL – https://localhost:8082/create-object-records.
  3. You can check created object records status response in file (create-object-records-response.json) and on browser.
  4. Note: Object record created status response is stored in file “create-object-records-response.json” at location “${mule.home}/apps/${app.name}/data/output/”.

Run Stand Alone

Complete all properties in one of the property files, for example in configuration.yaml and run your app with the corresponding environment variable to use it.

Run in CloudHub

After adding your application to Runtime Manager, go to Manage Application > Properties to set the environment variables listed in the Properties to Configure section.

Deploy in CloudHub

In Studio, right click your project name in Package Explorer and select Anypoint Platform > Deploy on CloudHub.

Properties to Configure

To use this template, you need to configure properties (credentials, configurations, etc.) either in a properties file or in Runtime Manager as Environment Variables.

Application Properties

https:
  host: "0.0.0.0"
  port: "8082"

veeva:
  vaultURL: your-vault-url.
  username: your-vault-username.
  password: your-vault-password.
  version : vault-api-version (e.g: v19.2).
  clientId: {company}-{organization}-{server}-{component} format.

ftp:
  host: your-vault-ftp-host.
  port: your-vault-ftp-port.
  username: your-vault-username.
  password: your-vault-password.
  working:  "/"

file:
  inputCreateDocRenditionPath: 'data/input/create-document-renditions-data.csv'
  outputCreateDocRenditionPath: 'data/output/create-document-renditions-response.json'
  inputUploadRenditionPath: 'data/input/upload-renditions-files.csv'
  inputCreateDocData: 'data/input/create-documents-data.csv'
  outputCreateDocPath: 'data/output/create-documents-response.json'
  inputUploadDocFiles: 'data/input/upload-document-files.csv'
  inputCreateObjRec: 'data/input/create-object-records-data.csv'
  outputCreateObjRec: 'data/output/create-object-records-response.json'

Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Partner
Published onJul 24, 2020
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.0

Categories

Industry Vertical
HealthcareNo values left to add

Tags